window.$$doc = jDev.doc = {
  
  _element: null,
  _frame: null,
  _loaded: null,

  _path: 'docs/',
  
  init: function() {
    $$doc._element = document.getElementById('jdDoc');
    $$doc._frame = document.getElementById('jdDoc_frame');
  },
  
  draw: function(height, width) {
    if (!$$doc._loaded) {
      $$doc._frame.src = jDev.baseURL + $$doc._path;
      $$doc._loaded = true;
      $$ui.maximize();
    }

    if (height) {
      $$doc._element.style.height = height + 'px';
    }
    if (width) {
      $$doc._element.style.width = width + 'px';
    }
  } 
  
};